home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / qbasicpg.zip / LOCAL.BAS < prev    next >
BASIC Source File  |  1989-08-31  |  568b  |  26 lines

  1. ' LOCAL.BAS
  2. ' This program demonstrates the use of a local variable.
  3.  
  4. DECLARE SUB AddGame ()     ' declare AddGame subprogram
  5.  
  6. game$ = "Chess"            ' initialize game$ with value of "Chess"
  7.  
  8. CLS
  9.  
  10. PRINT "      In the main program, game$ = "; game$ ' display in main prog.
  11.  
  12. AddGame                                            ' display in subprogram
  13.  
  14. PRINT " Back in the main program, game$ = "; game$ ' display in main prog.
  15.  
  16. END
  17.  
  18. SUB AddGame
  19.  
  20. game$ = game$ + " and backgammon"
  21.  
  22. PRINT "In the AddGame subprogram, game$ = "; game$
  23.  
  24. END SUB
  25.  
  26.